package com.ymttest.business.service.shenqi;

import com.ymt.base.YmatouEasyCall;
import com.ymt.core.tool.Logger;

public class SqTradingMqService {

	/**
	 * 应用编号：live_order_manager
	 * 业务代码：is_live_order
	 * @param isLiveOrder
	 * @param orderId
	 */
	public static void updateLiveOrder(Boolean isLiveOrder, Long orderId) {
		
		YmatouEasyCall updateLiveOrderCall = new YmatouEasyCall("", "POST", "JSON");
		StringBuilder updateLiveOrderString = new StringBuilder();

		updateLiveOrderString.append("{\"LiveOrder\": " + isLiveOrder + ",");
		updateLiveOrderString.append("\"OrderId\": " + orderId + "}");
		
		updateLiveOrderCall
				.setUrl("http://sqoptrade.iapi.shop2cn.com/api/Notify/updateLiveOrder");

		updateLiveOrderCall.setData(updateLiveOrderString.toString());

		try {
			updateLiveOrderCall.callService();

			Logger.comment(updateLiveOrderCall.getReturnData());

		} catch (Exception e) {

			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		
		SqTradingMqService.updateLiveOrder(true, 13512498699L);
	}
}
